/*
 * Copyright (c) 2017. 深圳一七科技. All rights reserved.
 */

package com.yiqi.liebang.framework.api;

import com.baiiu.filter.ClassifyBo;
import com.suozhang.framework.entity.bo.Result;
import com.yiqi.liebang.entity.bo.AnswerBo;
import com.yiqi.liebang.entity.bo.BanlanceBo;
import com.yiqi.liebang.entity.bo.CommentBo;
import com.yiqi.liebang.entity.bo.CreateOrderBo;
import com.yiqi.liebang.entity.bo.ExpertTopicBo;
import com.yiqi.liebang.entity.bo.HelpBo;
import com.yiqi.liebang.entity.bo.HomeBo;
import com.yiqi.liebang.entity.bo.OrderBo;
import com.yiqi.liebang.entity.bo.OrderQuestionInfofBo;
import com.yiqi.liebang.entity.bo.OtherUserId;
import com.yiqi.liebang.entity.bo.PageBo;
import com.yiqi.liebang.entity.bo.PayBo;
import com.yiqi.liebang.entity.bo.PeopleBo;
import com.yiqi.liebang.entity.bo.PrizeBo;
import com.yiqi.liebang.entity.bo.PublicBo;
import com.yiqi.liebang.entity.bo.QuestionBo;
import com.yiqi.liebang.entity.bo.QuestionDetailBo;
import com.yiqi.liebang.entity.bo.ReadButtomBo;
import com.yiqi.liebang.entity.bo.RechargeBo;
import com.yiqi.liebang.entity.bo.RelationshipBo;
import com.yiqi.liebang.entity.bo.SearchBo;
import com.yiqi.liebang.entity.bo.SearchFriendBo;
import com.yiqi.liebang.entity.bo.TopicBo;
import com.yiqi.liebang.entity.bo.TopicListBo;
import com.yiqi.liebang.entity.bo.TopicOrderBo;
import com.yiqi.liebang.entity.bo.TopicOrderInfoBo;
import com.yiqi.liebang.entity.bo.UnReadBo;
import com.yiqi.liebang.entity.bo.UserCenterBo;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;


public interface HomeApi {

    /**
     * 获取首页数据
     */
    @GET("v1/index/getPicture_Classify.shtml")
    Observable<Result<HomeBo>> getHomeData();

    /**
     * 获取全部分类
     */
    @GET("v1/index/get_all_classify.shtml")
    Observable<Result<List<ClassifyBo>>> getAllClassify();

    /**
     * 获取优惠券说明
     */

    @GET("v1/other/get_coupon_explain.shtml")
    Observable<Result<String>> getShuom();

    /**
     * 获取话题例表
     */

    @POST("v1/topic/screen_topic.shtml")
    Observable<Result<List<TopicBo>>> getTopList(@Body TopicListBo topicListBo);

    /**
     * 获取问答例表
     */

    @POST("v1/question/screen_question.shtml")
    Observable<Result<List<QuestionBo>>> getQuestionList(@Body TopicListBo topicListBo);

    /**
     * 获取类别获取用户
     */

    @POST("v1/question/get_hangJia_by_Type.shtml")
    Observable<Result<List<SearchFriendBo.UserFriendBean>>> getExpertListByType(@Body ClassifyBo classifyBo);

    /**
     * 获取问答价格
     */

    @POST("v1/question/get_question_price.shtml")
    Observable<Result<PrizeBo>> getQuestionPrize();

    /**
     * 根据标签获取标签
     */

    @POST("v1/question/get_answer_classify.shtml")
    Observable<Result<String>> getLabelsByUser(@Body PeopleBo peopleBo);


    /**
     * 根据父类标签
     */

    @POST("v1/question/get_hangJia.shtml")
    Observable<Result<List<ClassifyBo>>> getLabelsQuestion();

    /**
     * 创建订单
     */

    @POST("v1/order/take_order.shtml")
    Observable<Result<PayBo>> toOrder(@Body CreateOrderBo peopleBo);

    /**
     * 获取订单
     */

    @POST("v1/order/get_user_question.shtml")
    Observable<Result<List<OrderBo>>> getOrderList(@Body PageBo peopleBo);

    /**
     * 获取订单
     */

    @POST("v1/order/get_user_topic.shtml")
    Observable<Result<List<TopicOrderBo>>> getTopicOrderList(@Body PageBo peopleBo);

    /**
     * 获取订单未读数量
     */

    @POST("v1/order/get_user_questionNum.shtml")
    Observable<Result<UnReadBo>> getUnreadNUm(@Query("type") int type);

    /**
     * 订单详情
     */
    @GET("v1/order/question_order_detail.shtml")
    Observable<Result<OrderQuestionInfofBo>> getOrderInfo(@Query("id") String id, @Query("type") int type);

    /**
     * 话题订单详情
     */
    @GET("v1/order/topic_order_detail.shtml")
    Observable<Result<TopicOrderInfoBo>> getTopicOrderInfo(@Query("id") String id, @Query("type") int type);

    /**
     * 回答问答
     */
    @POST("v1/question/answer_question.shtml")
    Observable<Result<String>> toAnswerQuestion(@Body AnswerBo answerBo);

    /**
     * 评论问答
     */
    @POST("v1/order/evaluate_order.shtml")
    Observable<Result<String>> toCommentQuestion(@Body CommentBo answerBo);

    /**
     * 拒绝忽略回答
     */
    @GET("v1/question/ignore_question.shtml")
    Observable<Result<String>> toRefused(@Query("id") String id);

    /**
     * 拒绝忽略话题
     */
    @GET("v1/order/ignore_topic.shtml")
    Observable<Result<String>> toRefusedTopic(@Query("id") String id);

    /**
     * 取消订单
     */
    @POST("v1/order/cancel_order.shtml")
    Observable<Result<String>> cancleOrder(@Body CommentBo id);

    /**
     * 删除好友
     */
    @POST("v1/userFriend/delete_user_friend.shtml")
    Observable<Result<String>> deleteUser(@Body RelationshipBo relationshipBo);

    /**
     * 加入黑名单
     */
    @POST("v1/userFriend/add_user_blackList.shtml")
    Observable<Result<String>> addBlackList(@Body RelationshipBo relationshipBo);

    /**
     * 搜索话题
     */
    @POST("v1/topic/search_topic.shtml")
    Observable<Result<List<TopicBo>>> searchTopic(@Body SearchBo searchBo);

    /**
     * 搜索话题
     */
    @POST("v1/userAccountData/get_userCenter_question.shtml")
    Observable<Result<List<QuestionBo>>> getOtherTopic(@Body SearchBo searchBo);

    /**
     * 搜索问答
     */
    @POST("v1/question/search_question.shtml")
    Observable<Result<List<QuestionBo>>> searchQuestion(@Body SearchBo searchBo);

    /**
     * 搜索好友
     */
    @POST("v1/userFriend/search_friend.shtml")
    Observable<Result<SearchFriendBo>> searchFriends(@Body SearchBo searchBo);

    /**
     * 推荐好友
     */
    @POST("v1/userFriend/get_user_recommendation.shtml")
    Observable<Result<List<SearchFriendBo.UserFriendBean>>> tuijianFriends();

    /**
     * 搜索好友
     */
    @POST("v1/userFriend/search_user.shtml")
    Observable<Result<List<SearchFriendBo.UserFriendBean>>> searchFriendHJ(@Body SearchBo searchBo);

    /**
     * 余额充值
     */
    @POST("v1/coupon/user_Recharge.shtml")
    Observable<Result<PayBo>> userRecharge(@Body RechargeBo searchBo);

    /**
     * 余额提现
     */
    @POST("v1/coupon/user_forward.shtml")
    Observable<Result<PublicBo>> userWithdraw(@Body RechargeBo searchBo);

    /**
     * 话题详情
     */
    @GET("v1/topic/topic_detail.shtml")
    Observable<Result<UserCenterBo.TopicBean>> getTopicDetail(@Query("id") String id);

    /**
     * 钱包列表
     **/
    @POST("v1/coupon/get_user_assetsDetail.shtml")
    Observable<Result<BanlanceBo>> getUserAssetsDetail(@Body PageBo searchBo);


    /**
     * 行家预约时间
     **/
    @POST("v1/order/appointment_topic_order.shtml")
    Observable<Result<String>> appointmentTopicOrderExpert(@Body ExpertTopicBo expertTopicBo);

    /**
     * 学员确认预约
     */
    @GET("v1/order/appointment_userTopic_order.shtml")
    Observable<Result<String>> toStudentConfirm(@Query("id") String id);

    /**
     * 行家确认服务完成
     */
    @GET("v1/order/hangjiaSure_userTopic_order.shtml")
    Observable<Result<String>> toExpertComplete(@Query("id") String id);

    /**
     * 学员确认服务完成
     */
    @GET("v1/order/sure_userTopic_order.shtml")
    Observable<Result<String>> toStudentComplete(@Query("id") String id);

    /**
     * 提醒行家确认
     */
    @POST("v1/topic/remind_hangjia.shtml")
    Observable<Result<String>> remindExpertsConfirm(@Body ExpertTopicBo id);

    /**
     * 评论话题订单
     */
    @POST("v1/order/evaluate_order.shtml")
    Observable<Result<String>> toCommentTopicOrder(@Body CommentBo id);

    /**
     * 评论话题订单
     */
    @POST("v1/question/get_question_detail.shtml")
    Observable<Result<QuestionDetailBo>> getQuestionDetail(@Body CommentBo id);

    /**
     * 评论问答详情
     */
    @POST("v1/question/question_detail_evaluate.shtml")
    Observable<Result<String>> toCommentQuestionInfo(@Body CommentBo id);


    /**
     * 获取帮助
     */

    @POST("v1/help/getHelp_Classify.shtml")
    Observable<Result<List<HelpBo>>> getHelpList();

    /**
     * 消息红点
     */

    @POST("v1/message/red_button.shtml")
    Observable<Result<ReadButtomBo>> getRedButton();

    /**
     * 是否是好友
     */

    @POST("v1/userFriend/is_friend.shtml")
    Observable<Result<String>> isFriend(@Body OtherUserId peopleBo);

    /**
     * 添加好友
     */

    @POST("v1/userFriend/add_user_friend.shtml")
    Observable<Result<String>> getAddFriend(@Body PeopleBo registerBo);

    /***
     * 启动页
     * */

    @POST("v1/index/getAdvertisement.shtml")
    Observable<Result<HomeBo.IndexBannerBean>> getAdvertisement();

    /***
     * 获取认证打码图片
     * */

    @GET("v1/authentication/get_User_Mosaic.shtml")
    Observable<Result<String>> getUserMosaic(@Query("type") Integer type, @Query("userUid") String id);

}
